package br.edu.unilasalle.simon_api.dao;

import java.io.Serializable;
import java.util.List;

import javax.persistence.EntityManager;

import br.edu.unilasalle.simon_api.domain.BaseEntity;

public interface IGenericDao<T extends BaseEntity<ID>, ID extends Serializable> {

	void setEntityManager(EntityManager entityManager);
	
	T findById(ID id);
	
	List<T> findAll();

	T save(T entity);
	
	T merge(T entity);

	void delete(T entity);
	
	void refresh(T entity);
	
	void flush();

	T getReference(ID id);

	Boolean isPersisted(T entity);

}